package com.anlogic.sdk.bsp.handlers;

import org.eclipse.core.runtime.IProgressMonitor;

import com.anlogic.sdk.bsp.model.PlatformModel;

public class NewPlatformProjectHandler {
	private PlatformModel model;

	public static NewPlatformProjectHandler newInstance(PlatformModel model) {
		NewPlatformProjectHandler handler = new NewPlatformProjectHandler();
		handler.model = model;
		return handler;
	}

	public void run(IProgressMonitor monitor) {
		createProject(this.model, monitor);
	}

	private void createProject(PlatformModel model, IProgressMonitor monitor) {
		PlatformProjectCreator creator = new PlatformProjectCreator();
		creator.createPlatformProject(model, monitor);
	}
}
